import { createRouter, createWebHistory } from 'vue-router'

import Login from '../views/home/login.vue'
import Index from '../views/index.vue'
import Home from '../views/home/home.vue'
import Teacher from "@/components/management/teacher.vue"
import School from "@/components/management/school.vue"

const routes = [
  {
    path: "/",
    name: "index",
    component: Index,
    children: [
      {
        path: 'login',
        name: 'login',
        component: Login
      },
    ],
  },
  {
    path: '/home',
    name: 'home',
    component: Home,
    children: [
      {
        path: 'teacher',
        name: 'Teacher',
        component: Teacher,
      },
      {
        path: 'school',
        name: 'School',
        component: School,
      }
    ]
  },
  // {
  //   path: '/',
  //   name: 'home',
  //   component: HomeView
  // },
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
